From 15986803501c40c30e1c79c05cf3c9c725740ff0 Mon Sep 17 00:00:00 2001 From: Jim Fehlig Date: Tue, 13 Mar 2007 18:13:11 -0600 Subject: [PATCH] Managed HVM guests are not displayed by 'xm list' after restarting xend. This patch prevents writing empty configuration items to the domain's sexpr configuration file. Without the empty items, the sexpr is parsed properly when xend is started. Signed-off-by: Jim Fehlig --- tools/python/xen/xend/XendConfig.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/python/xen/xend/XendConfig.py b/tools/python/xen/xend/XendConfig.py index 0cc7c7c3a0..e36e89a0df 100644 --- a/tools/python/xen/xend/XendConfig.py +++ b/tools/python/xen/xend/XendConfig.py @@ -730,7 +730,7 @@ class XendConfig(dict): for key in XENAPI_PLATFORM_CFG: val = sxp.child_value(image_sxp, key, None) - if val is not None: + if val is not None and val != '': self['platform'][key] = val notes = sxp.children(image_sxp, 'notes') @@ -1359,7 +1359,7 @@ class XendConfig(dict): for key in XENAPI_PLATFORM_CFG: val = sxp.child_value(image_sxp, key, None) - if val is not None: + if val is not None and val != '': self['platform'][key] = val notes = sxp.children(image_sxp, 'notes') -- 2.30.2